// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.randomizedWorld.randomizedDeadSurvivor;

import zombie.core.Rand;
import zombie.iso.BuildingDef;
import zombie.iso.RoomDef;
import zombie.iso.objects.IsoDeadBody;

public final class RDSGunmanInBathroom extends RandomizedDeadSurvivorBase {
    @Override
    public void randomizeDeadSurvivor(BuildingDef def) {
        RoomDef roomDef = super.getRoom(def, "bathroom");
        IsoDeadBody isoDeadBody = RandomizedDeadSurvivorBase.createRandomDeadBody(roomDef, Rand.Next(5, 10));
        if (isoDeadBody != null) {
            isoDeadBody.setPrimaryHandItem(super.addRandomRangedWeapon(isoDeadBody.getContainer(), true, false, false));
            int int0 = Rand.Next(1, 4);

            for (int int1 = 0; int1 < int0; int1++) {
                isoDeadBody.getContainer().AddItem(super.addRandomRangedWeapon(isoDeadBody.getContainer(), true, true, true));
            }
        }
    }

    public RDSGunmanInBathroom() {
        this.name = "Bathroom Gunman";
        this.setChance(5);
    }
}
